<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

</head>

<body>
    <script>
        // hash1向hash3传递值
        let hash = location.hash;
        console.log(hash);
        let iframe = document.createElement('iframe');
        iframe.src = 'http://localhost:3000/hash2.html#idontloveyou';
        document.body.appendChild(iframe);
    </script>
</body>

</html>